
if instance_exists(objMissionParent)
{
    nearbymission=instance_nearest(objPlayer.x,objPlayer.y,objMissionParent);
    Dist=point_distance(nearbymission.x,nearbymission.y,objPlayer.x,objPlayer.y);
    Dir=point_direction(nearbymission.x,nearbymission.y,objPlayer.x,objPlayer.y);
    if (Dist<500)
{
alpha_rate=0
}
else
{
alpha_rate=1
}
}



//////
if instance_exists(objSideMissionParent)
{
    nearbysidemission=instance_nearest(objPlayer.x,objPlayer.y,objSideMissionParent);
    Dist2=point_distance(nearbysidemission.x,nearbysidemission.y,objPlayer.x,objPlayer.y);
    Dir2=point_direction(nearbysidemission.x,nearbysidemission.y,objPlayer.x,objPlayer.y);
    if (Dist2<500)
{
alpha_rate2=0
}
else
{
alpha_rate2=1
}
}


